package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.TbGroup;
import com.bwie.pojo.TbGroupActive;
import com.bwie.service.TbGroupActiveService;
import com.bwie.mapper.TbGroupActiveMapper;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 叶雨洁
* @description 针对表【tb_group_active】的数据库操作Service实现
* @createDate 2025-07-27 19:14:38
*/
@Service
public class TbGroupActiveServiceImpl extends ServiceImpl<TbGroupActiveMapper, TbGroupActive>
    implements TbGroupActiveService{

    @Autowired
    TbGroupActiveMapper groupActiveMapper;
    @Override
    public R TeamActivePageList(PageInfoVo pageInfoVo) {

        Page<TbGroupActive> tbGroupActivePage = new Page<>(pageInfoVo.getPageNum(),pageInfoVo.getPageSize());

        QueryWrapper<TbGroupActive> queryWrapper = new QueryWrapper<>();
        groupActiveMapper.selectPage(tbGroupActivePage,queryWrapper);

        return R.OK();
    }

    @Override
    public R groupActive(PageInfoVo pageInfoVo) {
        Page<TbGroupActive> tbGroupActivePage = new Page<>(pageInfoVo.getPageNum(),pageInfoVo.getPageSize());

        QueryWrapper<TbGroupActive> queryWrapper = new QueryWrapper<>();

        Page<TbGroupActive> tbGroupActivePage1 = groupActiveMapper.selectPage(tbGroupActivePage, queryWrapper);


        return R.OK(tbGroupActivePage1);
    }

    @Override
    public R addGroup(TbGroupActive tbGroupActive) {

        groupActiveMapper.insert(tbGroupActive);
        return R.OK();
    }
}




